/**
 * <p>Copyright:Copyright(c) 2019</p>
 * <p>Company:Professional</p>
 * <p>Package:com.cesgroup.zw.spring.boot.echarts.graph</p>
 * <p>File:SimpleGraphSeries.java</p>
 * <p>类更新历史信息</p>
 * @todo chanlong(陈龙) 创建于 Jun 6, 2019 3:06:55 PM
 */
package com.cesgroup.zw.spring.boot.library.echarts.graph.simple;

import com.cesgroup.zw.spring.boot.echarts.component.series.Graph;
import com.cesgroup.zw.spring.boot.echarts.enums.Layout;
import com.cesgroup.zw.spring.boot.echarts.enums.Position;
import com.cesgroup.zw.spring.boot.echarts.model.series.Force;
import com.cesgroup.zw.spring.boot.echarts.model.style.LabelStyle;
import com.cesgroup.zw.spring.boot.echarts.model.style.LineStyle;

/**
 * <p>描述: </p>
 * <p>Company: Professional</p>
 * @author chanlong(陈龙)
 * @date Jun 6, 2019 3:06:55 PM
 * @version 1.0.2019
 */
@SuppressWarnings("serial")
public class SimpleGraphSeries extends Graph {

	public SimpleGraphSeries(SimpleGraphParam param) {
		this.setName(param.getName());
		this.setLayout(Layout.force);
		this.setRoam(true);
		this.setForce(new Force() {{
			this.setGravity(0.1);
			this.setEdgeLength(15);
			this.setRepulsion(300);
			this.setLayoutAnimation(true);
		}});
		this.setLabel(new LabelStyle() {{
			this.setShow(true);
			this.setPosition(Position.bottom);
			this.setFontSize(10);
		}});
		this.setLineStyle(new LineStyle() {{
			this.setWidth(1.5);
			this.setOpacity(0.9);
			this.setCurveness(0.3);
		}});
		this.setSymbolSize(20);
		this.setCategories(param.getCategories());
	}
}
